<?php 
//   Contiene el "sidebar" o menu que se despliega al lado derecho de la pagina
?>
			<div id="sidebar">
					<div class="box">
						<h3>Noticias</h3>
						<ul class="list">
						<?php 
							$sql="SELECT idnews,title,fddate FROM news WHERE ambit=1 ORDER BY fddate DESC LIMIT 5";
							$rs=DataBase::ExecuteQuery($sql, "ARRAY");					
							$i=count($rs);
							foreach ($rs as $row => $value)
							{
					
								$class= ($row=='0')? 'class="first"':'';
							    
								echo '<li '.$class.' >';
								echo '<a href="javascript:;" onclick="get(\'panel_control/viewer_news.php?id='.$value['idnews'].'\',\'content\');" >'.$value['title'].'</a>';
								echo '</li>';
								
							}
							
						?>
							
						</ul>
					</div>
					<div class="box">
						<h3>Eventos</h3>
						<ul class="list">
						<?php 
							$sql="SELECT idnews,title,fddate FROM news WHERE ambit=2 ORDER BY fddate DESC LIMIT 5";
							$rs=DataBase::ExecuteQuery($sql, "ARRAY");					
							$i=count($rs);
							foreach ($rs as $row => $value)
							{
					
								$class= ($row=='0')? 'class="first"':'';
							    
								echo '<li '.$class.' >';
								echo '<a href="javascript:;" onclick="get(\'panel_control/viewer_news.php?id='.$value['idnews'].'\',\'content\');" >'.$value['title'].'</a>';
								echo '</li>';
								
							}
							
						?>
						</ul>
					</div>
				</div>